package entity;

public class PlanetResult<T> {
    private boolean pflag;
    private Integer pcode;
    private String pmessage;
    private T data;

    public PlanetResult(boolean pflag, Integer pcode, String pmessage, Object data){
        this.pcode = pcode;
        this.pflag = pflag;
        this.pmessage = pmessage;
        this.data = (T) data;
    }

    public PlanetResult(boolean pflag, Integer pcode, String pmessage){
        this.pflag = pflag;
        this.pmessage = pmessage;
        this.pcode = pcode;
    }

    public PlanetResult(){
        this.pflag = true;
        this.pcode = PlanetStatusCode.OK;
        this.pmessage = "操作成功!";
    }
}
